<%--
    Document   : editManager
    Created on : May 13, 2009, 12:26:03 AM
    Author     : Dany Gunawan
--%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<c:set var="title" value="Edit Manager" scope="page"/>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>${title}</title>
    </head>
    <body>
        <h1>${title}</h1>
        <f:view>
            <!-- Show error messages -->
            <h:form id="frmNotification">
                <h:inputHidden id="hdnGeneralManagerErrorNotification" ></h:inputHidden>
                <h:message showSummary="true" showDetail="true" style="color: red; font-family: 'New Century Schoolbook', serif; font-style: oblique" for="hdnGeneralManagerErrorNotification"/>
            </h:form>

            <h:form id="manager">
                <h:inputHidden value="#{ManagerJSFManagedBean.manager.id}" required="true" id="id"/>
                <table>
                    <tr>
                        <td class="label">Username: </td>
                        <td class="required">*</td>
                        <td><h:inputText value="#{ManagerJSFManagedBean.manager.username}" required="true" id="username"/></td>
                        <td>
                            <h:message showSummary="true" showDetail="false" style="color: red; font-family: 'New Century Schoolbook', serif; font-style: oblique" for="username"/>
                        </td>
                    </tr>
                    <tr>
                        <td class="label">Password: </td>
                        <td class="required">*</td>
                        <td><h:inputText value="#{ManagerJSFManagedBean.manager.password}" required="true" id="password"/></td>
                        <td>
                            <h:message showSummary="true" showDetail="false" style="color: red; font-family: 'New Century Schoolbook', serif; font-style: oblique" for="password"/>
                        </td>
                    </tr>
                    <tr>
                        <td class="label">Firstname: </td>
                        <td class="required">*</td>
                        <td><h:inputText value="#{ManagerJSFManagedBean.manager.firstName}" required="true" id="firstName"/></td>
                        <td>
                            <h:message showSummary="true" showDetail="false" style="color: red; font-family: 'New Century Schoolbook', serif; font-style: oblique" for="firstName"/>
                        </td>
                    </tr>
                    <tr>
                        <td class="label">Last name: </td>
                        <td class="required">*</td>
                        <td><h:inputText value="#{ManagerJSFManagedBean.manager.lastName}" required="true" id="lastName"/></td>
                        <td>
                            <h:message showSummary="true" showDetail="false" style="color: red; font-family: 'New Century Schoolbook', serif; font-style: oblique" for="lastName"/>
                        </td>
                    </tr>
                    <tr>
                        <td class="label">Email address: </td>
                        <td class="required">*</td>
                        <td><h:inputText value="#{ManagerJSFManagedBean.manager.emailAddress}" required="true" id="emailAddress"/></td>
                        <td>
                            <h:message showSummary="true" showDetail="false" style="color: red; font-family: 'New Century Schoolbook', serif; font-style: oblique" for="emailAddress"/>
                        </td>
                    </tr>
                    <tr>
                        <td class="label">Contact number: </td>
                        <td class="required">*</td>
                        <td><h:inputText value="#{ManagerJSFManagedBean.manager.contactNumber}" required="true" id="contactNumber"/></td>
                        <td>
                            <h:message showSummary="true" showDetail="false" style="color: red; font-family: 'New Century Schoolbook', serif; font-style: oblique" for="contactNumber"/>
                        </td>
                    </tr>
                    <tr>
                        <td class="label">Address: </td>
                        <td class="required">*</td>
                        <td><h:inputText value="#{ManagerJSFManagedBean.manager.address}" required="true" id="address"/></td>
                        <td>
                            <h:message showSummary="true" showDetail="false" style="color: red; font-family: 'New Century Schoolbook', serif; font-style: oblique" for="address"/>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">&nbsp;</td>
                        <td><h:commandButton id="submit" value="Submit" action="#{ManagerJSFManagedBean.saveManager}"/></td>
                        <td>&nbsp;</td>
                    </tr>
                </table>
            </h:form>
        </f:view>
    </body>
</html>